package com.zm.se.interceptor;

import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class LoginInterceptor implements HandlerInterceptor {
    //预处理方法
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
      /*  if(request.getSession().getAttribute("num")==null){
            System.err.println("无登录信息，进行拦截");
            response.sendRedirect("/web/login.html");
            return false;
        }*/
        System.out.println("放行");
        return true;
    }
}
